<?php

namespace app\school\validate;

use think\Validate;

class SchoolCourseValidate extends Validate
{
    protected $rule = [
        'title'  => 'require',   
        'subject_id'  => 'require',        
        'class_id'  => 'require',     
        'teacher_id'  => 'require',   
        'classroom'  => 'require',  
        'num'  => 'require',  
        'open_time'  => 'require',    
        'class_time'  => 'require',     
        'cutoff_time'  => 'require',  
        'signup_time'  => 'require',                                                       
    ];
    protected $message = [
        'title.require' => '课程名称不能为空',
        'subject_id.require' => '请选择科目',       
        'class_id.require' => '请选择班别',
        'teacher_id.require' => '请选择教师',
        'classroom.require' => '课室名称不能为空',
        'num.require' => '班额不能为空',
        'open_time.require' => '开班时间不能为空',
        'signup_time'  => '报名时间不能为空',         
        'class_time.require' => '上课时间不能为空',
        'cutoff_time.require' => '截止时间不能为空',
    ];

    protected $scene = [
//        'add'  => ['user_login,user_pass,user_email'],
//        'edit' => ['user_login,user_email'],
    ];

}